﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Text;
using netDxf;
using netDxf.Blocks;
using netDxf.Collections;
using netDxf.Entities;
using netDxf.Header;
using netDxf.Objects;
using netDxf.Tables;
using netDxf.Units;
using Point = netDxf.Entities.Point;
using Trace = netDxf.Entities.Trace;
using System.Threading;

namespace TestDxfDocument
{
    class GB16656
    {
        public static void Standard16656_47_1(Dictionary<string, Object> data)
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
                                                                           //参数
            double pi = Math.PI;
            string path = Convert.ToString(data["path"]);
            //坐标
            Vector2 v0 = new Vector2(0, 0);
            Vector2 v1 = fun.Polar(v0, 90 * pi / 180, 8.2);
            Vector2 v2 = fun.Polar(v1, pi, 8.5);
            Vector2 v3 = fun.Polar(v2, -90 * pi / 180, 4.2);
            Vector2 v4 = fun.Polar(v3, pi, 1.6);
            Vector2 v5 = fun.Polar(v4, -90 * pi / 180, 1.5);
            Vector2 v6 = fun.Polar(v5, pi, 19.25);
            Vector2 v7 = new Vector2(v6.X - 1, v6.Y - 0.5);
            Vector2 v8 = new Vector2(v1.X, -v1.Y);
            Vector2 v9 = new Vector2(v2.X, -v2.Y);
            Vector2 v10 = new Vector2(v3.X, -v3.Y);
            Vector2 v11 = new Vector2(v4.X, -v4.Y);
            Vector2 v12 = new Vector2(v5.X, -v5.Y);
            Vector2 v13 = new Vector2(v6.X, -v6.Y);
            Vector2 v14 = new Vector2(v7.X, -v7.Y);
            Vector2 v15 = fun.Polar(v2, 90 * pi / 180, 4);
            Vector2 v16 = fun.Polar(v9, -90 * pi / 180, 3);
            Vector2 v17 = fun.Polar(v2, 90 * pi / 180, 2);
            Vector2 v18 = fun.Polar(v17, 0, 2);
            Vector2 v19 = fun.Polar(v18, 90 * pi / 180, 1.5);
            Vector2 v20 = fun.Polar(v19, 0, 3);
            Vector2 v21 = fun.Polar(v20, -90 * pi / 180, 3);
            Vector2 v22 = fun.Polar(v21, pi, 3);
            Vector2 v23 = new Vector2(v7.X - 3.25, v0.Y);
            Vector2 v24 = fun.Polar(v0, 0, 1.25);

            LwPolyline line1 = new LwPolyline();
            line1.Vertexes.Add(new LwPolylineVertex(v1));
            line1.Vertexes.Add(new LwPolylineVertex(v2));
            line1.Vertexes.Add(new LwPolylineVertex(v3));
            line1.Vertexes.Add(new LwPolylineVertex(v4));
            line1.Vertexes.Add(new LwPolylineVertex(v5));
            line1.Vertexes.Add(new LwPolylineVertex(v6));
            line1.Vertexes.Add(new LwPolylineVertex(v7));
            line1.Vertexes.Add(new LwPolylineVertex(v14));
            line1.Vertexes.Add(new LwPolylineVertex(v13));
            line1.Vertexes.Add(new LwPolylineVertex(v12));
            line1.Vertexes.Add(new LwPolylineVertex(v11));
            line1.Vertexes.Add(new LwPolylineVertex(v10));
            line1.Vertexes.Add(new LwPolylineVertex(v9));
            line1.Vertexes.Add(new LwPolylineVertex(v8));
            line1.Vertexes.Add(new LwPolylineVertex(v1));
            line1.Layer = contour;
            line1.Lineweight = Lineweight.W50;
            dxf.AddEntity(line1);
            Line line2 = new Line(v6, v13);
            line2.Layer = contour;
            line2.Lineweight = Lineweight.W50;
            dxf.AddEntity(line2);
            Line line3 = new Line(v5, v12);
            line3.Layer = contour;
            line3.Lineweight = Lineweight.W50;
            dxf.AddEntity(line3);
            Line line4 = new Line(v3, v10);
            line4.Layer = contour;
            line4.Lineweight = Lineweight.W50;
            dxf.AddEntity(line4);
            Line line5 = new Line(v15, v2);
            dxf.AddEntity(line5);
            Line line6 = new Line(v9, v16);
            dxf.AddEntity(line6);
            Line line7 = new Line(v17, v18);
            dxf.AddEntity(line7);
            Line line8 = new Line(v19, v20);
            dxf.AddEntity(line8);
            Line line9 = new Line(v20, v21);
            dxf.AddEntity(line9);
            Line line10 = new Line(v21, v22);
            dxf.AddEntity(line10);
            Line line11 = new Line(v22, v19);
            dxf.AddEntity(line11);
            Line line12 = new Line(v23, v24);
            line12.Layer = centre;
            line12.Lineweight = Lineweight.W25;
            line12.Linetype = Linetype.DashDot;
            dxf.AddEntity(line12);

            fun.jt(dxf, fun.Polar(v21, 90 * pi / 180, 1.25), 30, 5, 3, "");
            fun.jt(dxf, fun.Polar(v5, pi, 10), 130, 7.5, 3, "");
            fun.jt(dxf, fun.Polar(v23, 0, 1.25), 138, 4, 3, "");
            fun.jt(dxf, fun.Polar(v10, -90 * pi / 180, 2), -164, 10, 3, "");
            fun.jt(dxf, fun.Polar(v9, -90 * pi / 180, 2), -154, 3, 3, "");


            fun.text(dxf, new Vector2(1.5, 15), 1, "GB/T 17851表示表格");
            fun.text(dxf, new Vector2(-5.25, 9.75), 1, "B");
            fun.text(dxf, new Vector2(-32, 10.2), 1, "datum_feature‘A'(圆柱)");
            fun.text(dxf, new Vector2(-42.5, 4), 1, "datum‘A'");
            fun.text(dxf, new Vector2(-35, -10.2), 1, "datum_feature‘B'(面)");
            fun.text(dxf, new Vector2(-19.5, -13.5), 1, "datum‘B'");





            fun.text(dxf, new Vector2(-33, -25), 2, "图 1 基准和基准要素的实例");



            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Standard16656_47_2(Dictionary<string, Object> data)
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
                                                                           //参数
            double pi = Math.PI;
            string path = Convert.ToString(data["path"]);
            //坐标
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = fun.Polar(v1, 44 * pi / 180, 22.5);
            Vector2 v3 = fun.Polar(v2, 90 * pi / 180, 3.5);
            Vector2 v4 = fun.Polar(v1, 90 * pi / 180, 3.5);
            Vector2 v5 = fun.Polar(v3, pi, 24);
            Vector2 v6 = fun.Polar(v4, pi, 24);
            Vector2 v7 = fun.Polar(v6, -90 * pi / 180, 3.5);
            Vector2 v8 = fun.Polar(v7, 0, 8);
            Vector2 v9 = fun.Polar(v8, 90 * pi / 180, 3.5);
            Vector2 v10 = fun.Polar(v9, 46 * pi / 180, 9);
            Vector2 v13 = fun.Polar(v4, pi, 8.35);
            Vector2 v12 = fun.Polar(v13, 46 * pi / 180, 9);
            Vector2 v16 = fun.Polar(v13, 46 * pi / 180, 7.5927);
            Vector2 v11 = fun.Polar(v16, 90 * pi / 180, 3.5);
            Vector2 v14 = fun.Polar(v13, -90 * pi / 180, 3.5);
            Vector2 v15 = fun.Polar(v12, -90 * pi / 180, 3.5);
            Vector2 v17 = fun.Polar(v10, -90 * pi / 180, 3.5);
            Vector2 v18 = fun.Polar(v1, 109 * pi / 180, 18.73);
            Vector2 v19 = fun.Polar(v18, 0, 8);
            Vector2 v20 = fun.Polar(v19, 0, 8);
            Vector2 v21 = fun.Polar(v20, -90 * pi / 180, 3.5);
            Vector2 v22 = fun.Polar(v19, -90 * pi / 180, 3.5);
            Vector2 v23 = fun.Polar(v18, -90 * pi / 180, 3.5);

            LwPolyline line1 = new LwPolyline();
            line1.Vertexes.Add(new LwPolylineVertex(v4));
            line1.Vertexes.Add(new LwPolylineVertex(v3));
            line1.Vertexes.Add(new LwPolylineVertex(v5));
            line1.Vertexes.Add(new LwPolylineVertex(v6));
            line1.Vertexes.Add(new LwPolylineVertex(v9));
            line1.Vertexes.Add(new LwPolylineVertex(v10));
            line1.Vertexes.Add(new LwPolylineVertex(v11));
            line1.Vertexes[5].Bulge = Math.Tan(-45 * pi / 180 / 4);
            line1.Vertexes.Add(new LwPolylineVertex(v12));
            line1.Vertexes[6].Bulge = Math.Tan(-124 * pi / 180 / 4);
            line1.Vertexes.Add(new LwPolylineVertex(v13));
            line1.Vertexes.Add(new LwPolylineVertex(v4));
            line1.Layer = contour;
            line1.Lineweight = Lineweight.W50;
            dxf.AddEntity(line1);
            LwPolyline line2 = new LwPolyline();
            line2.Vertexes.Add(new LwPolylineVertex(v6));
            line2.Vertexes.Add(new LwPolylineVertex(v7));
            line2.Vertexes.Add(new LwPolylineVertex(v8));
            line2.Vertexes.Add(new LwPolylineVertex(v17));
            line2.Vertexes.Add(new LwPolylineVertex(v16));
            line2.Vertexes[3].Bulge = Math.Tan(-45 * pi / 180 / 4);
            line2.Layer = contour;
            line2.Lineweight = Lineweight.W50;
            dxf.AddEntity(line2);
            LwPolyline line3 = new LwPolyline();
            line3.Vertexes.Add(new LwPolylineVertex(v13));
            line3.Vertexes.Add(new LwPolylineVertex(v14));
            line3.Vertexes.Add(new LwPolylineVertex(v1));
            line3.Vertexes.Add(new LwPolylineVertex(v2));
            line3.Vertexes.Add(new LwPolylineVertex(v3));
            line3.Layer = contour;
            line3.Lineweight = Lineweight.W50;
            dxf.AddEntity(line3);
            Line line4 = new Line(v9, v8);
            line4.Layer = contour;
            line4.Lineweight = Lineweight.W50;
            dxf.AddEntity(line4);
            Line line5 = new Line(v10, v17);
            line5.Layer = contour;
            line5.Lineweight = Lineweight.W50;
            dxf.AddEntity(line5);
            Line line6 = new Line(v4, v1);
            line6.Layer = contour;
            line6.Lineweight = Lineweight.W50;
            dxf.AddEntity(line6);
            Line line7 = new Line(v12, v15);
            line7.Layer = refin;
            line7.Lineweight = Lineweight.W35;
            line7.Linetype = Linetype.Dashed;
            dxf.AddEntity(line7);
            LwPolyline line8 = new LwPolyline();
            line8.Vertexes.Add(new LwPolylineVertex(v16));
            line8.Vertexes.Add(new LwPolylineVertex(v15));
            line8.Vertexes.Add(new LwPolylineVertex(v14));
            line8.Vertexes[0].Bulge = Math.Tan(-124 * pi / 180 / 4);
            line8.Layer = refin;
            line8.Lineweight = Lineweight.W35;
            line8.Linetype = Linetype.Dashed;
            dxf.AddEntity(line8);
            Line line9 = new Line(fun.Polar(v18, pi, 2), fun.Polar(v23, pi, 2));
            line9.Layer = refin;
            line9.Lineweight = Lineweight.W35;
            line9.Linetype = Linetype.Dashed;
            dxf.AddEntity(line9);
            Line line10 = new Line(fun.Polar(v18, 0, 2), fun.Polar(v23, 0, 2));
            line10.Layer = refin;
            line10.Lineweight = Lineweight.W35;
            line10.Linetype = Linetype.Dashed;
            dxf.AddEntity(line10);
            Line line11 = new Line(fun.Polar(v19, pi, 2), fun.Polar(v22, pi, 2));
            line11.Layer = refin;
            line11.Lineweight = Lineweight.W35;
            line11.Linetype = Linetype.Dashed;
            dxf.AddEntity(line11);
            Line line12 = new Line(fun.Polar(v19, 0, 2), fun.Polar(v22, 0, 2));
            line12.Layer = refin;
            line12.Lineweight = Lineweight.W35;
            line12.Linetype = Linetype.Dashed;
            dxf.AddEntity(line12);
            Line line13 = new Line(fun.Polar(v20, pi, 2), fun.Polar(v21, pi, 2));
            line13.Layer = refin;
            line13.Lineweight = Lineweight.W35;
            line13.Linetype = Linetype.Dashed;
            dxf.AddEntity(line13);
            Line line14 = new Line(fun.Polar(v20, 0, 2), fun.Polar(v21, 0, 2));
            line14.Layer = refin;
            line14.Lineweight = Lineweight.W35;
            line14.Linetype = Linetype.Dashed;
            dxf.AddEntity(line14);
            Ellipse ellipse15 = new Ellipse(v18, 4, 2);
            ellipse15.Rotation = 0;
            ellipse15.Layer = refin;
            ellipse15.Lineweight = Lineweight.W35;
            ellipse15.Linetype = Linetype.Dashed;
            dxf.AddEntity(ellipse15);
            Ellipse ellipse16 = new Ellipse(v19, 4, 2);
            ellipse16.Rotation = 0;
            ellipse16.Layer = refin;
            ellipse16.Lineweight = Lineweight.W35;
            ellipse16.Linetype = Linetype.Dashed;
            dxf.AddEntity(ellipse16);
            Ellipse ellipse17 = new Ellipse(v20, 4, 2);
            ellipse17.Rotation = 0;
            ellipse17.Layer = refin;
            ellipse17.Lineweight = Lineweight.W35;
            ellipse17.Linetype = Linetype.Dashed;
            dxf.AddEntity(ellipse17);
            Ellipse ellipse18 = new Ellipse(v21, 4, 2);
            ellipse18.Rotation = 0;
            ellipse18.Layer = refin;
            ellipse18.Lineweight = Lineweight.W35;
            ellipse18.Linetype = Linetype.Dashed;
            dxf.AddEntity(ellipse18);
            Ellipse ellipse19 = new Ellipse(v22, 4, 2);
            ellipse19.Rotation = 0;
            ellipse19.Layer = refin;
            ellipse19.Lineweight = Lineweight.W35;
            ellipse19.Linetype = Linetype.Dashed;
            dxf.AddEntity(ellipse19);
            Ellipse ellipse20 = new Ellipse(v23, 4, 2);
            ellipse20.Rotation = 0;
            ellipse20.Layer = refin;
            ellipse20.Lineweight = Lineweight.W35;
            ellipse20.Linetype = Linetype.Dashed;
            dxf.AddEntity(ellipse20);

            fun.jt(dxf, v18, 35, 15.5, 3, "");
            fun.jt(dxf, v19, 54, 10.5, 3, "");
            fun.jt(dxf, v20, 90, 9.5, 3, "");
            fun.jt(dxf, fun.Polar(v13, 167 * pi / 180, 4.9), 107, 16, 3, "");
            fun.jt(dxf, fun.Polar(v13, 46 * pi / 180, 2.25), 122, 17.5, 3, "");
            fun.jt(dxf, fun.Polar(v13, 72 * pi / 180, 6.25), 127, 13, 3, "");



            fun.text(dxf, new Vector2(-22.5, 23.25), 0.5, "两个平面和一个圆柱面一起形成了一个");
            fun.text(dxf, new Vector2(-20, 22.5), 0.5, "composite_shape_aspect");


            fun.text(dxf, new Vector2(5, 30), 0.5, "三个圆柱一起形成了一个");
            fun.text(dxf, new Vector2(5, 29), 0.5, "composite_shape_aspect");


            fun.text(dxf, new Vector2(-18, -17), 2, "图 2 组合的形状外观");

            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Standard16656_47_3(Dictionary<string, Object> data)
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
                                                                           //参数
            double pi = Math.PI;
            string path = Convert.ToString(data["path"]);
            //坐标
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = fun.Polar(v1, 0, 35);
            Vector2 v3 = fun.Polar(v2, 90 * pi / 180, 15);
            Vector2 v4 = fun.Polar(v1, 90 * pi / 180, 34.5);
            Vector2 v5 = fun.Polar(v3, -90 * pi / 180, 4.75);
            Vector2 v6 = fun.Polar(v2, 90 * pi / 180, 4.75);
            Vector2 v7 = fun.Polar(v5, pi, 18);
            Vector2 v8 = fun.Polar(v6, pi, 18);
            Vector2 v9 = fun.Polar(v2, 45 * pi / 180, 24);
            Vector2 v10 = fun.Polar(v3, 45 * pi / 180, 24);
            Vector2 v11 = fun.Polar(v4, 45 * pi / 180, 24);
            Vector2 v12 = fun.Polar(v5, 45 * pi / 180, 24);
            Vector2 v13 = fun.Polar(v6, 45 * pi / 180, 24);
            Vector2 v15 = fun.Polar(v8, 45 * pi / 180, 7.7782);
            Vector2 v14 = fun.Polar(v13, pi, 5.5);
            Vector2 v16 = fun.Polar(v1, 90 * pi / 180, 14);
            Vector2 v17 = fun.Polar(v16, -135 * pi / 180, 9.1524);
            Vector2 v18 = fun.Polar(v17, 0, 57.5);
            Vector2 v19 = fun.Polar(v18, 45 * pi / 180, 24.5);
            Vector2 v20 = fun.Polar(v5, 45 * pi / 180, 20.6109);
            Vector2 v21 = fun.Polar(v1, 23 * pi / 180, 98);
            Vector2 v22 = fun.Polar(v21, -90 * pi / 180, 39);
            Vector2 v23 = fun.Polar(v21, -90 * pi / 180, 8);
            Vector2 v24 = fun.Polar(v23, -90 * pi / 180, 23);
            Vector2 v25 = fun.Polar(v23, pi, 4);
            Vector2 v26 = fun.Polar(v23, pi, 11);
            Vector2 v27 = fun.Polar(v23, 0, 4);
            Vector2 v28 = fun.Polar(v23, 0, 11);
            Vector2 v29 = fun.Polar(v25, -90 * pi / 180, 23);
            Vector2 v30 = fun.Polar(v26, -90 * pi / 180, 23);
            Vector2 v31 = fun.Polar(v27, -90 * pi / 180, 23);
            Vector2 v32 = fun.Polar(v28, -90 * pi / 180, 23);

            LwPolyline line1 = new LwPolyline();
            line1.Vertexes.Add(new LwPolylineVertex(v1));
            line1.Vertexes.Add(new LwPolylineVertex(v2));
            line1.Vertexes.Add(new LwPolylineVertex(v6));
            line1.Vertexes.Add(new LwPolylineVertex(v8));
            line1.Vertexes.Add(new LwPolylineVertex(v7));
            line1.Vertexes.Add(new LwPolylineVertex(v5));
            line1.Vertexes.Add(new LwPolylineVertex(v3));
            line1.Vertexes.Add(new LwPolylineVertex(v4));
            line1.Vertexes.Add(new LwPolylineVertex(v1));
            line1.Layer = contour;
            line1.Lineweight = Lineweight.W50;
            dxf.AddEntity(line1);
            LwPolyline line2 = new LwPolyline();
            line2.Vertexes.Add(new LwPolylineVertex(v4));
            line2.Vertexes.Add(new LwPolylineVertex(v11));
            line2.Vertexes.Add(new LwPolylineVertex(v10));
            line2.Vertexes.Add(new LwPolylineVertex(v12));
            line2.Vertexes.Add(new LwPolylineVertex(v5));
            line2.Layer = contour;
            line2.Lineweight = Lineweight.W50;
            dxf.AddEntity(line2);
            LwPolyline line3 = new LwPolyline();
            line3.Vertexes.Add(new LwPolylineVertex(v14));
            line3.Vertexes.Add(new LwPolylineVertex(v13));
            line3.Vertexes.Add(new LwPolylineVertex(v9));
            line3.Vertexes.Add(new LwPolylineVertex(v2));
            line3.Layer = contour;
            line3.Lineweight = Lineweight.W50;
            dxf.AddEntity(line3);
            Line line4 = new Line(v8, v15);
            line4.Layer = contour;
            line4.Lineweight = Lineweight.W50;
            dxf.AddEntity(line4);
            Line line5 = new Line(v3, v10);
            line5.Layer = contour;
            line5.Lineweight = Lineweight.W50;
            dxf.AddEntity(line5);
            Line line6 = new Line(v6, v13);
            line6.Layer = contour;
            line6.Lineweight = Lineweight.W50;
            dxf.AddEntity(line6);
            Line line7 = new Line(v26, v30);
            line7.Layer = contour;
            line7.Lineweight = Lineweight.W50;
            dxf.AddEntity(line7);
            Line line8 = new Line(v28, v32);
            line8.Layer = contour;
            line8.Lineweight = Lineweight.W50;
            dxf.AddEntity(line8);
            Line line9 = new Line(v25, v29);
            line9.Layer = refin;
            line9.Lineweight = Lineweight.W35;
            line9.Linetype = Linetype.Dashed;
            dxf.AddEntity(line9);
            Line line10 = new Line(v27, v31);
            line10.Layer = refin;
            line10.Lineweight = Lineweight.W35;
            line10.Linetype = Linetype.Dashed;
            dxf.AddEntity(line10);
            LwPolyline line11 = new LwPolyline();
            line11.Vertexes.Add(new LwPolylineVertex(v16));
            line11.Vertexes.Add(new LwPolylineVertex(v17));
            line11.Vertexes.Add(new LwPolylineVertex(v18));
            line11.Vertexes.Add(new LwPolylineVertex(v19));
            line11.Vertexes.Add(new LwPolylineVertex(v20));
            line11.Layer = refin;
            line11.Lineweight = Lineweight.W35;
            line11.Linetype = Linetype.Dashed;
            dxf.AddEntity(line11);
            Line line12 = new Line(v21, v22);
            line12.Layer = centre;
            line12.Lineweight = Lineweight.W25;
            line12.Linetype = Linetype.DashDot;
            dxf.AddEntity(line12);
            Ellipse ellipse1 = new Ellipse(v23, 8, 4);
            ellipse1.Layer = contour;
            ellipse1.Lineweight = Lineweight.W50;
            dxf.AddEntity(ellipse1);
            Ellipse ellipse2 = new Ellipse(v23, 22, 12);
            ellipse2.Layer = contour;
            ellipse2.Lineweight = Lineweight.W50;
            dxf.AddEntity(ellipse2);
            Ellipse ellipse3 = new Ellipse(v24, 8, 4);
            ellipse3.Layer = refin;
            ellipse3.Lineweight = Lineweight.W35;
            ellipse3.Linetype = Linetype.Dashed;
            dxf.AddEntity(ellipse3);
            Ellipse ellipse4 = new Ellipse(v24, 22, 12);
            ellipse4.Layer = contour;
            ellipse4.Lineweight = Lineweight.W50;
            dxf.AddEntity(ellipse4);

            fun.jt(dxf, fun.Polar(v8, 0, 7.5), -59, 6, 3, "");
            fun.jt(dxf, fun.Polar(v7, 0, 12), -70, 11, 3, "");
            fun.jt(dxf, fun.Polar(v1, 20 * pi / 180, 63), 88, 20, 3, "");
            fun.jt(dxf, fun.Polar(v21, -90 * pi / 180, 1), 149, 12, 3, "");


            fun.text(dxf, new Vector2(22, -3), 1, "给出的 symmetric_shape_aspect");
            fun.text(dxf, new Vector2(22, -5), 1, "作为 relating_shape_aspect");
            fun.text(dxf, new Vector2(59, 46), 1, "给出的 centre of symmetry");
            fun.text(dxf, new Vector2(59, 44), 1, "作为 relating_shape_aspect");


            fun.text(dxf, new Vector2(18, -14), 2, "a)");
            fun.text(dxf, new Vector2(90, -14), 2, "b)");

            fun.text(dxf, new Vector2(10, -30), 4, "图3 对称形状外观和对称中心");


            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Standard16656_47_4(Dictionary<string, Object> data)
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
                                                                           //参数
            double pi = Math.PI;
            string path = Convert.ToString(data["path"]);
            //坐标
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = fun.Polar(v1, -25 * pi / 180, 25.5);
            Vector2 v3 = fun.Polar(v2, 47 * pi / 180, 4);
            Vector2 v4 = fun.Polar(v3, -25 * pi / 180, 9);
            Vector2 v5 = fun.Polar(v4, -90 * pi / 180, 0.3);
            Vector2 v6 = fun.Polar(v4, -90 * pi / 180, 4.8);
            Vector2 v7 = fun.Polar(v6, -25 * pi / 180, 11.75);
            Vector2 v8 = fun.Polar(v5, -25 * pi / 180, 11.75);
            Vector2 v9 = fun.Polar(v3, 90 * pi / 180, 4.5);
            Vector2 v10 = fun.Polar(v2, 90 * pi / 180, 4.5);
            Vector2 v11 = fun.Polar(v1, 90 * pi / 180, 4.5);
            Vector2 v12 = fun.Polar(v11, 45 * pi / 180, 31);
            Vector2 v13 = fun.Polar(v8, 45 * pi / 180, 31);
            Vector2 v14 = fun.Polar(v7, 45 * pi / 180, 31);
            Vector2 v15 = fun.Polar(v13, -135 * pi / 180, 4.5);
            Vector2 v16 = fun.Polar(v14, -135 * pi / 180, 4.5);
            Vector2 v17 = fun.Polar(v15, -135 * pi / 180, 6);
            Vector2 v18 = fun.Polar(v16, -135 * pi / 180, 6);
            Vector2 v19 = fun.Polar(v15, 153 * pi / 180, 12.5);
            Vector2 v20 = fun.Polar(v16, 153 * pi / 180, 12.5);
            Vector2 v21 = fun.Polar(v17, 153 * pi / 180, 12.5);
            Vector2 v22 = fun.Polar(v17, 153 * pi / 180, 9.1543);
            Vector2 v23 = fun.Polar(v17, 153 * pi / 180, 27.25);
            Vector2 v24 = fun.Polar(v17, 153 * pi / 180, 39.5);
            Vector2 v25 = fun.Polar(v15, 153 * pi / 180, 39.5);
            Vector2 v26 = fun.Polar(v15, 153 * pi / 180, 27.25);
            Vector2 v27 = fun.Polar(v25, -90 * pi / 180, 4.5);
            Vector2 v28 = fun.Polar(v23, 153 * pi / 180, 8.9043);
            Vector2 v29 = fun.Polar(v23, 45 * pi / 180, 1.7841);
            Vector2 v30 = fun.Polar(v1, 116 * pi / 180, 14.4766);
            Vector2 v31 = fun.Polar(v30, -27 * pi / 180, 69);
            Vector2 v32 = fun.Polar(v30, 47 * pi / 180, 20.1089);
            Vector2 v33 = fun.Polar(v32, -27 * pi / 180, 69);
            Vector2 v34 = fun.Polar(v11, 45 * pi / 180, 4.9447);
            Vector2 v35 = fun.Polar(v34, 90 * pi / 180, 16.5);
            Vector2 v36 = fun.Polar(v35, -26 * pi / 180, 48.6735);
            Vector2 v37 = fun.Polar(v36, -90 * pi / 180, 36);
            Vector2 v38 = fun.Polar(v34, -90 * pi / 180, 19);
            Vector2 v39 = fun.Polar(v11, 45 * pi / 180, 25.2694);
            Vector2 v40 = fun.Polar(v39, 90 * pi / 180, 12.6);
            Vector2 v41 = fun.Polar(v40, -26 * pi / 180, 48.6081);
            Vector2 v42 = fun.Polar(v41, -90 * pi / 180, 44.25);
            Vector2 v43 = fun.Polar(v37, 90 * pi / 180, 8.7704);
            Vector2 v44 = fun.Polar(v34, -27 * pi / 180, 7.6);
            Vector2 v45 = fun.Polar(v44, -27 * pi / 180, 11.6);
            Vector2 v46 = fun.Polar(v44, -143 * pi / 180, 4.25);
            Vector2 v47 = fun.Polar(v44, 37 * pi / 180, 4.25);
            Vector2 v48 = fun.Polar(v45, -143 * pi / 180, 4.25);
            Vector2 v49 = fun.Polar(v45, 37 * pi / 180, 4.25);
            Vector2 v50 = fun.Polar(v44, 90 * pi / 180, 11.5);
            Vector2 v51 = fun.Polar(v44, -90 * pi / 180, 17);
            Vector2 v52 = fun.Polar(v45, 90 * pi / 180, 11.5);
            Vector2 v53 = fun.Polar(v45, -90 * pi / 180, 17);
            Vector2 v54 = fun.Polar(v24, -47 * pi / 180, 6.6376);
            Vector2 v55 = fun.Polar(v54, 52 * pi / 180, 10.75);
            Vector2 v56 = fun.Polar(v21, -36 * pi / 180, 5.5);
            Vector2 v57 = fun.Polar(v56, 52 * pi / 180, 9.2585);
            Vector2 v58 = fun.Polar(v44, -90 * pi / 180, 6);
            Vector2 v59 = fun.Polar(v45, -90 * pi / 180, 6);
            Vector2 v60 = fun.Polar(v44, pi, 3.75);
            Vector2 v61 = fun.Polar(v44, 0, 3.75);
            Vector2 v65 = fun.Polar(v45, 0, 3.75);
            Vector2 v64 = fun.Polar(v45, pi, 3.75);
            Vector2 v62 = fun.Polar(v60, -90 * pi / 180, 6);
            Vector2 v63 = fun.Polar(v61, -90 * pi / 180, 6);
            Vector2 v66 = fun.Polar(v64, -90 * pi / 180, 6);
            Vector2 v67 = fun.Polar(v65, -90 * pi / 180, 6);


            LwPolyline line1 = new LwPolyline();
            line1.Vertexes.Add(new LwPolylineVertex(v1));
            line1.Vertexes.Add(new LwPolylineVertex(v2));
            line1.Vertexes.Add(new LwPolylineVertex(v3));
            line1.Vertexes.Add(new LwPolylineVertex(v4));
            line1.Vertexes.Add(new LwPolylineVertex(v6));
            line1.Vertexes.Add(new LwPolylineVertex(v7));
            line1.Vertexes.Add(new LwPolylineVertex(v8));
            line1.Vertexes.Add(new LwPolylineVertex(v5));
            line1.Layer = contour;
            line1.Lineweight = Lineweight.W50;
            dxf.AddEntity(line1);
            LwPolyline line2 = new LwPolyline();
            line2.Vertexes.Add(new LwPolylineVertex(v1));
            line2.Vertexes.Add(new LwPolylineVertex(v11));
            line2.Vertexes.Add(new LwPolylineVertex(v12));
            line2.Vertexes.Add(new LwPolylineVertex(v13));
            line2.Vertexes.Add(new LwPolylineVertex(v15));
            line2.Vertexes.Add(new LwPolylineVertex(v19));
            line2.Vertexes.Add(new LwPolylineVertex(v21));
            line2.Vertexes.Add(new LwPolylineVertex(v17));
            line2.Vertexes.Add(new LwPolylineVertex(v8));
            line2.Layer = contour;
            line2.Lineweight = Lineweight.W50;
            dxf.AddEntity(line2);
            LwPolyline line3 = new LwPolyline();
            line3.Vertexes.Add(new LwPolylineVertex(v11));
            line3.Vertexes.Add(new LwPolylineVertex(v10));
            line3.Vertexes.Add(new LwPolylineVertex(v9));
            line3.Vertexes.Add(new LwPolylineVertex(v3));
            line3.Layer = contour;
            line3.Lineweight = Lineweight.W50;
            dxf.AddEntity(line3);
            LwPolyline line4 = new LwPolyline();
            line4.Vertexes.Add(new LwPolylineVertex(v13));
            line4.Vertexes.Add(new LwPolylineVertex(v14));
            line4.Vertexes.Add(new LwPolylineVertex(v16));
            line4.Vertexes.Add(new LwPolylineVertex(v20));
            line4.Vertexes.Add(new LwPolylineVertex(v22));
            line4.Layer = contour;
            line4.Lineweight = Lineweight.W50;
            dxf.AddEntity(line4);
            LwPolyline line5 = new LwPolyline();
            line5.Vertexes.Add(new LwPolylineVertex(v24));
            line5.Vertexes.Add(new LwPolylineVertex(v25));
            line5.Vertexes.Add(new LwPolylineVertex(v26));
            line5.Vertexes.Add(new LwPolylineVertex(v23));
            line5.Vertexes.Add(new LwPolylineVertex(v24));
            line5.Layer = contour;
            line5.Lineweight = Lineweight.W50;
            dxf.AddEntity(line5);
            LwPolyline line6 = new LwPolyline();
            line6.Vertexes.Add(new LwPolylineVertex(v7));
            line6.Vertexes.Add(new LwPolylineVertex(v18));
            line6.Vertexes.Add(new LwPolylineVertex(v17));
            line6.Layer = contour;
            line6.Lineweight = Lineweight.W50;
            dxf.AddEntity(line6);
            Line line7 = new Line(v10, v2);
            line7.Layer = contour;
            line7.Lineweight = Lineweight.W50;
            dxf.AddEntity(line7);
            Line line8 = new Line(v20, v19);
            line8.Layer = contour;
            line8.Lineweight = Lineweight.W50;
            dxf.AddEntity(line8);
            Line line9 = new Line(v16, v15);
            line9.Layer = contour;
            line9.Lineweight = Lineweight.W50;
            dxf.AddEntity(line9);
            Line line10 = new Line(v25, v27);
            line10.Layer = contour;
            line10.Lineweight = Lineweight.W50;
            dxf.AddEntity(line10);
            Line line11 = new Line(v28, v27);
            line11.Layer = contour;
            line11.Lineweight = Lineweight.W50;
            dxf.AddEntity(line11);
            Line line12 = new Line(v27, v29);
            line12.Layer = contour;
            line12.Lineweight = Lineweight.W50;
            dxf.AddEntity(line12);
            LwPolyline line13 = new LwPolyline();
            line13.Vertexes.Add(new LwPolylineVertex(v35));
            line13.Vertexes.Add(new LwPolylineVertex(v36));
            line13.Vertexes.Add(new LwPolylineVertex(v37));
            line13.Vertexes.Add(new LwPolylineVertex(v38));
            line13.Vertexes.Add(new LwPolylineVertex(v35));
            line13.Layer = contour;
            dxf.AddEntity(line13);
            LwPolyline line14 = new LwPolyline();
            line14.Vertexes.Add(new LwPolylineVertex(v39));
            line14.Vertexes.Add(new LwPolylineVertex(v40));
            line14.Vertexes.Add(new LwPolylineVertex(v41));
            line14.Vertexes.Add(new LwPolylineVertex(v42));
            line14.Vertexes.Add(new LwPolylineVertex(v43));
            line14.Layer = contour;
            dxf.AddEntity(line14);
            Line line15 = new Line(v30, v31);
            line15.Layer = centre;
            line15.Lineweight = Lineweight.W25;
            line15.Linetype = Linetype.DashDot;
            dxf.AddEntity(line15);
            Line line16 = new Line(v32, v33);
            line16.Layer = centre;
            line16.Lineweight = Lineweight.W25;
            line16.Linetype = Linetype.DashDot;
            dxf.AddEntity(line16);
            Line line17 = new Line(v46, v47);
            line17.Layer = centre;
            line17.Lineweight = Lineweight.W25;
            line17.Linetype = Linetype.DashDot;
            dxf.AddEntity(line17);
            Line line18 = new Line(v48, v49);
            line18.Layer = centre;
            line18.Lineweight = Lineweight.W25;
            line18.Linetype = Linetype.DashDot;
            dxf.AddEntity(line18);
            Line line19 = new Line(v50, v51);
            line19.Layer = centre;
            line19.Lineweight = Lineweight.W25;
            line19.Linetype = Linetype.DashDot;
            dxf.AddEntity(line19);
            Line line20 = new Line(v52, v53);
            line20.Layer = centre;
            line20.Lineweight = Lineweight.W25;
            line20.Linetype = Linetype.DashDot;
            dxf.AddEntity(line20);
            Line line21 = new Line(v54, v55);
            line21.Layer = centre;
            line21.Lineweight = Lineweight.W25;
            line21.Linetype = Linetype.DashDot;
            dxf.AddEntity(line21);
            Line line22 = new Line(v56, v57);
            line22.Layer = centre;
            line22.Lineweight = Lineweight.W25;
            line22.Linetype = Linetype.DashDot;
            dxf.AddEntity(line22);
            Ellipse ellipse1 = new Ellipse(v44, 7.5, 4);
            ellipse1.Layer = contour;
            ellipse1.Lineweight = Lineweight.W50;
            dxf.AddEntity(ellipse1);
            Ellipse ellipse2 = new Ellipse(v45, 7.5, 4);
            ellipse2.Layer = contour;
            ellipse2.Lineweight = Lineweight.W50;
            dxf.AddEntity(ellipse2);
            Ellipse ellipse3 = new Ellipse(v58, 7.5, 4);
            ellipse3.Layer = refin;
            ellipse3.Lineweight = Lineweight.W35;
            ellipse3.Linetype = Linetype.Dashed;
            dxf.AddEntity(ellipse3);
            Ellipse ellipse4 = new Ellipse(v59, 7.5, 4);
            ellipse4.Layer = refin;
            ellipse4.Lineweight = Lineweight.W35;
            ellipse4.Linetype = Linetype.Dashed;
            dxf.AddEntity(ellipse4);
            Line line25 = new Line(v60, v62);
            line25.Layer = refin;
            line25.Lineweight = Lineweight.W35;
            line25.Linetype = Linetype.Dashed;
            dxf.AddEntity(line25);
            Line line26 = new Line(v61, v63);
            line26.Layer = refin;
            line26.Lineweight = Lineweight.W35;
            line26.Linetype = Linetype.Dashed;
            dxf.AddEntity(line26);
            Line line27 = new Line(v64, v66);
            line27.Layer = refin;
            line27.Lineweight = Lineweight.W35;
            line27.Linetype = Linetype.Dashed;
            dxf.AddEntity(line27);
            Line line28 = new Line(v65, v67);
            line28.Layer = refin;
            line28.Lineweight = Lineweight.W35;
            line28.Linetype = Linetype.Dashed;
            dxf.AddEntity(line28);


            fun.jt(dxf, fun.Polar(v50, -90 * pi / 180, 4.5), 130, 17, 3, "");
            fun.jt(dxf, fun.Polar(v52, -90 * pi / 180, 0.75), 143, 24.5, 3, "");
            fun.jt(dxf, fun.Polar(v25, -49 * pi / 180, 2.5), 39, 14.5, 3, "");
            fun.jt(dxf, fun.Polar(v19, -54 * pi / 180, 2.75), 104, 21, 3, "");
            fun.jt(dxf, fun.Polar(v38, 9 * pi / 180, 25.5), -148, 21.5, 3, "");
            fun.jt(dxf, fun.Polar(v38, -20 * pi / 180, 39.5), -154, 10.5, 3, "");
            fun.jt(dxf, fun.Polar(v38, -15 * pi / 180, 53), -165, 24.5, 3, "");
            fun.text(dxf, new Vector2(-4.5, 26.5), 1, "线性特征");
            fun.text(dxf, new Vector2(38, 30.5), 1, "给出的shape_aspect为按行对齐");
            fun.text(dxf, new Vector2(38, 29), 1, "的对象（related_shape_aspect)");
            fun.text(dxf, new Vector2(4, -21), 1, "平面特征");
            fun.text(dxf, new Vector2(4, -30.5), 1, "给出的geometric_alignment为按行对齐");
            fun.text(dxf, new Vector2(4, -32), 1, "的对象（relating_shape_aspect)");





            fun.text(dxf, new Vector2(20, -45), 3, "图4 几何对齐");



            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Standard16656_47_5(Dictionary<string, Object> data)
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
                                                                           //参数
            double pi = Math.PI;
            string path = Convert.ToString(data["path"]);
            //坐标
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = fun.Polar(v1, 0, 49.5);
            Vector2 v3 = fun.Polar(v2, 48 * pi / 180, 15.5);
            Vector2 v4 = fun.Polar(v2, 90 * pi / 180, 9.5);
            Vector2 v5 = fun.Polar(v3, 90 * pi / 180, 9.5);
            Vector2 v6 = fun.Polar(v1, 90 * pi / 180, 24);
            Vector2 v7 = fun.Polar(v6, 48 * pi / 180, 15.5);
            Vector2 v8 = fun.Polar(v6, 0 * pi / 180, 31.5);
            Vector2 v9 = fun.Polar(v7, 0 * pi / 180, 31.5);
            Vector2 v13 = fun.Polar(v8, 0 * pi / 180, 44.5);
            Vector2 v12 = fun.Polar(v9, 0 * pi / 180, 34.1285);
            Vector2 v10 = fun.Polar(v4, 90 * pi / 180, 38.5);
            Vector2 v11 = fun.Polar(v5, 90 * pi / 180, 26.9513);
            Vector2 v14 = fun.Polar(v1, 22 * pi / 180, 47.2808);
            Vector2 v15 = fun.Polar(v1, 33 * pi / 180, 80.0812);


            LwPolyline line1 = new LwPolyline();
            line1.Vertexes.Add(new LwPolylineVertex(v1));
            line1.Vertexes.Add(new LwPolylineVertex(v6));
            line1.Vertexes.Add(new LwPolylineVertex(v8));
            line1.Vertexes.Add(new LwPolylineVertex(v4));
            line1.Vertexes[2].Bulge = Math.Tan(-78 * pi / 180 / 4);
            line1.Vertexes.Add(new LwPolylineVertex(v2));
            line1.Vertexes.Add(new LwPolylineVertex(v1));
            line1.Layer = contour;
            line1.Lineweight = Lineweight.W50;
            dxf.AddEntity(line1);
            LwPolyline line2 = new LwPolyline();
            line2.Vertexes.Add(new LwPolylineVertex(v6));
            line2.Vertexes.Add(new LwPolylineVertex(v7));
            line2.Vertexes.Add(new LwPolylineVertex(v9));
            line2.Vertexes.Add(new LwPolylineVertex(v5));
            line2.Vertexes[2].Bulge = Math.Tan(-78 * pi / 180 / 4);
            line2.Vertexes.Add(new LwPolylineVertex(v3));
            line2.Vertexes.Add(new LwPolylineVertex(v2));
            line2.Layer = contour;
            line2.Lineweight = Lineweight.W50;
            dxf.AddEntity(line2);
            Line line3 = new Line(v8, v9);
            line3.Layer = contour;
            line3.Lineweight = Lineweight.W50;
            dxf.AddEntity(line3);
            Line line4 = new Line(v4, v5);
            line4.Layer = contour;
            line4.Lineweight = Lineweight.W50;
            dxf.AddEntity(line4); 
            LwPolyline line5 = new LwPolyline();
            line5.Vertexes.Add(new LwPolylineVertex(v4));
            line5.Vertexes.Add(new LwPolylineVertex(v10));
            line5.Vertexes.Add(new LwPolylineVertex(v11));
            line5.Vertexes.Add(new LwPolylineVertex(v5));
            line5.Layer = contour;
            line5.Lineweight = Lineweight.W50;
            dxf.AddEntity(line5);
            LwPolyline line6 = new LwPolyline();
            line6.Vertexes.Add(new LwPolylineVertex(v8));
            line6.Vertexes.Add(new LwPolylineVertex(v13));
            line6.Vertexes.Add(new LwPolylineVertex(v12));
            line6.Vertexes.Add(new LwPolylineVertex(v9));
            line6.Layer = refin;
            line6.Lineweight = Lineweight.W35;
            line6.Linetype = Linetype.Dashed;
            dxf.AddEntity(line6);
            Line line7 = new Line(v14, v15);
            line7.Layer = centre;
            line7.Lineweight = Lineweight.W25;
            line7.Linetype = Linetype.DashDot;
            dxf.AddEntity(line7);

            fun.jt(dxf, fun.Polar(v1, 39 * pi / 180, 68.33), 166, 10, 3, "");
            fun.jt(dxf, fun.Polar(v1, 32 * pi / 180, 76.543), 103, 8.5, 3, "");
            fun.jt(dxf, fun.Polar(v1, 22 * pi / 180, 75), -78, 20, 3, "");




            fun.text(dxf, new Vector2(21, 45.5), 1, "扩展（related_shape_aspect 2)");
            fun.text(dxf, new Vector2(53.5, 50.5), 1, "(relating_shape_aspect)");
            fun.text(dxf, new Vector2(53.5, 52), 1, "geometric_intersection");
            fun.text(dxf, new Vector2(72.5, 5.5), 1, "扩展");
            fun.text(dxf, new Vector2(65, 4), 1, "（related_shape_aspect 1)");




            fun.text(dxf, new Vector2(26.5, -15), 3, "图5 几何相交");




            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Standard16656_47_6(Dictionary<string, Object> data)
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
                                                                           //参数
            double pi = Math.PI;
            string path = Convert.ToString(data["path"]);
            //坐标
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = fun.Polar(v1, 90 * pi / 180, 26);
            Vector2 v3 = fun.Polar(v2, pi, 26);
            Vector2 v4 = fun.Polar(v1, pi, 26);
            Vector2 v5 = fun.Polar(v3, 90 * pi / 180, 6);
            Vector2 v6 = fun.Polar(v4, -90 * pi / 180, 6);
            Vector2 v7 = fun.Polar(v3, -90 * pi / 180, 13);
            Vector2 v8 = fun.Polar(v7, 180 * pi / 180, 13);
            Vector2 v9 = fun.Polar(v7, 180 * pi / 180, 19);
            Vector2 v10 = fun.Polar(v7, 152 * pi / 180, 13);
            Vector2 v11 = fun.Polar(v7, -154 * pi / 180, 19);


            LwPolyline line1 = new LwPolyline();
            line1.Vertexes.Add(new LwPolylineVertex(v1));
            line1.Vertexes.Add(new LwPolylineVertex(v2));
            line1.Vertexes.Add(new LwPolylineVertex(v3));
            line1.Vertexes.Add(new LwPolylineVertex(v4));
            line1.Vertexes[2].Bulge = Math.Tan(180 * pi / 180 / 4);
            line1.Vertexes.Add(new LwPolylineVertex(v1));
            line1.Layer = contour;
            line1.Lineweight = Lineweight.W50;
            dxf.AddEntity(line1);
            LwPolyline line2 = new LwPolyline();
            line2.Vertexes.Add(new LwPolylineVertex(v5));
            line2.Vertexes.Add(new LwPolylineVertex(v6));
            line2.Vertexes[0].Bulge = Math.Tan(180 * pi / 180 / 4);
            line2.Layer = contour;
            line2.Lineweight = Lineweight.W50;
            dxf.AddEntity(line2);
            fun.jt(dxf, v8, 0, 5, 3, "");
            fun.jt(dxf, v9, 180, 5.5, 3, "");
            fun.jt(dxf, v10, -43, 36.5, 3, "");
            fun.jt(dxf, v11, -120, 13, 3, "");



            fun.text(dxf, new Vector2(-55.25, 12.5), 1, "偏移");
            fun.text(dxf, new Vector2(-57, -9.5), 1, "给出的 paralle_offset");
            fun.text(dxf, new Vector2(-57, -11), 1, "作为 related_shape_aspect");
            fun.text(dxf, new Vector2(-17, -8.5), 1, "给出的基础 shape_aspect 作");
            fun.text(dxf, new Vector2(-17, -10), 1, "为 related_shape_aspect");







            fun.text(dxf, new Vector2(-34, -22), 3, "图6 平行偏移");




            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Standard16656_47_7(Dictionary<string, Object> data)
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
                                                                           //参数
            double pi = Math.PI;
            string path = Convert.ToString(data["path"]);
            //坐标
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = fun.Polar(v1, -148 * pi / 180, 41.7452);
            Vector2 v3 = fun.Polar(v2, 0 * pi / 180, 58.5);
            Vector2 v4 = fun.Polar(v2, 72 * pi / 180, 43);
            Vector2 v5 = fun.Polar(v3, 77.5 * pi / 180, 41.8884);
            Vector2 v6 = fun.Polar(v2, -90 * pi / 180, 7.5);
            Vector2 v7 = fun.Polar(v3, -90 * pi / 180, 7.5);
            Vector2 v8 = fun.Polar(v5, -90 * pi / 180, 9.125);
            Vector2 v9 = fun.Polar(v1, 135 * pi / 180, 16.8105);
            Vector2 v10 = fun.Polar(v9, 180 * pi / 180, 3);
            Vector2 v11 = fun.Polar(v9, 0 * pi / 180, 3);
            Vector2 v12 = fun.Polar(v9, -90 * pi / 180, 5.5);
            Vector2 v13 = fun.Polar(v10, -90 * pi / 180, 5.5);
            Vector2 v14 = fun.Polar(v11, -90 * pi / 180, 5.5);
            Vector2 v15 = fun.Polar(v1, 45 * pi / 180, 16.8105);
            Vector2 v16 = fun.Polar(v15, 180 * pi / 180, 3);
            Vector2 v17 = fun.Polar(v15, 0 * pi / 180, 3);
            Vector2 v18 = fun.Polar(v15, -90 * pi / 180, 5.5);
            Vector2 v19 = fun.Polar(v16, -90 * pi / 180, 5.5);
            Vector2 v20 = fun.Polar(v17, -90 * pi / 180, 5.5);
            Vector2 v21 = fun.Polar(v1, -135 * pi / 180, 16.8105);
            Vector2 v22 = fun.Polar(v21, 180 * pi / 180, 3);
            Vector2 v23 = fun.Polar(v21, 0 * pi / 180, 3);
            Vector2 v24 = fun.Polar(v21, -90 * pi / 180, 5.5);
            Vector2 v25 = fun.Polar(v22, -90 * pi / 180, 5.5);
            Vector2 v26 = fun.Polar(v23, -90 * pi / 180, 5.5);
            Vector2 v27 = fun.Polar(v1, -45 * pi / 180, 16.8105);
            Vector2 v28 = fun.Polar(v27, 180 * pi / 180, 3);
            Vector2 v29 = fun.Polar(v27, 0 * pi / 180, 3);
            Vector2 v30 = fun.Polar(v27, -90 * pi / 180, 5.5);
            Vector2 v31 = fun.Polar(v28, -90 * pi / 180, 5.5);
            Vector2 v32 = fun.Polar(v29, -90 * pi / 180, 5.5);


            LwPolyline line1 = new LwPolyline();
            line1.Vertexes.Add(new LwPolylineVertex(v2));
            line1.Vertexes.Add(new LwPolylineVertex(v3));
            line1.Vertexes.Add(new LwPolylineVertex(v5));
            line1.Vertexes.Add(new LwPolylineVertex(v4));
            line1.Vertexes.Add(new LwPolylineVertex(v2));
            line1.Layer = contour;
            line1.Lineweight = Lineweight.W50;
            dxf.AddEntity(line1);
            LwPolyline line2 = new LwPolyline();
            line2.Vertexes.Add(new LwPolylineVertex(v2));
            line2.Vertexes.Add(new LwPolylineVertex(v6));
            line2.Vertexes.Add(new LwPolylineVertex(v7));
            line2.Vertexes.Add(new LwPolylineVertex(v8));
            line2.Vertexes.Add(new LwPolylineVertex(v5));
            line2.Layer = contour;
            line2.Lineweight = Lineweight.W50;
            dxf.AddEntity(line2);
            Line line3 = new Line(v3, v7);
            line3.Layer = contour;
            line3.Lineweight = Lineweight.W50;
            dxf.AddEntity(line3);
            Line line4 = new Line(fun.Polar(v1, pi, 1.5), fun.Polar(v1, 0, 1.5));
            line4.Layer = contour;
            dxf.AddEntity(line4);
            Line line5 = new Line(fun.Polar(v1, 90 * pi / 180, 1.5), fun.Polar(v1, -90 * pi / 180, 1.5));
            line5.Layer = contour;
            dxf.AddEntity(line5);
            Line line6 = new Line(fun.Polar(v9, pi, 1.2), fun.Polar(v9, 0, 1.2));
            line6.Layer = contour;
            dxf.AddEntity(line6);
            Line line7 = new Line(fun.Polar(v9, 90 * pi / 180, 1.2), fun.Polar(v9, -90 * pi / 180, 1.2));
            line7.Layer = contour;
            dxf.AddEntity(line7);
            Line line8 = new Line(fun.Polar(v15, pi, 1.2), fun.Polar(v15, 0, 1.2));
            line8.Layer = contour;
            dxf.AddEntity(line8);
            Line line9 = new Line(fun.Polar(v15, 90 * pi / 180, 1.2), fun.Polar(v15, -90 * pi / 180, 1.2));
            line9.Layer = contour;
            dxf.AddEntity(line9);
            Line line10 = new Line(fun.Polar(v21, pi, 1.2), fun.Polar(v21, 0, 1.2));
            line10.Layer = contour;
            dxf.AddEntity(line10);
            Line line11 = new Line(fun.Polar(v21, 90 * pi / 180, 1.2), fun.Polar(v21, -90 * pi / 180, 1.2));
            line11.Layer = contour;
            dxf.AddEntity(line11);
            Line line12 = new Line(fun.Polar(v27, pi, 1.2), fun.Polar(v27, 0, 1.2));
            line12.Layer = contour;
            dxf.AddEntity(line12);
            Line line13 = new Line(fun.Polar(v27, 90 * pi / 180, 1.2), fun.Polar(v27, -90 * pi / 180, 1.2));
            line13.Layer = contour;
            dxf.AddEntity(line13);
            Ellipse ellipse1 = new Ellipse(v1, 45, 28);
            ellipse1.Layer = contour;
            ellipse1.Lineweight = Lineweight.W50;
            dxf.AddEntity(ellipse1);
            Ellipse ellipse2 = new Ellipse(v9, 6, 2.8);
            ellipse2.Layer = contour;
            ellipse2.Lineweight = Lineweight.W50;
            dxf.AddEntity(ellipse2);
            Ellipse ellipse3 = new Ellipse(v15, 6, 2.8);
            ellipse3.Layer = contour;
            ellipse3.Lineweight = Lineweight.W50;
            dxf.AddEntity(ellipse3);
            Ellipse ellipse4 = new Ellipse(v21, 6, 2.8);
            ellipse4.Layer = contour;
            ellipse4.Lineweight = Lineweight.W50;
            dxf.AddEntity(ellipse4);
            Ellipse ellipse5 = new Ellipse(v27, 6, 2.8);
            ellipse5.Layer = contour;
            ellipse5.Lineweight = Lineweight.W50;
            dxf.AddEntity(ellipse5);
            Ellipse ellipse6 = new Ellipse(v12, 6, 2.8);
            ellipse6.Layer = refin;
            ellipse6.Lineweight = Lineweight.W35;
            ellipse6.Linetype = Linetype.Dashed;
            dxf.AddEntity(ellipse6);
            Ellipse ellipse7 = new Ellipse(v18, 6, 2.8);
            ellipse7.Layer = refin;
            ellipse7.Lineweight = Lineweight.W35;
            ellipse7.Linetype = Linetype.Dashed;
            dxf.AddEntity(ellipse7);
            Ellipse ellipse8 = new Ellipse(v24, 6, 2.8);
            ellipse8.Layer = refin;
            ellipse8.Lineweight = Lineweight.W35;
            ellipse8.Linetype = Linetype.Dashed;
            dxf.AddEntity(ellipse8);
            Ellipse ellipse9 = new Ellipse(v30, 6, 2.8);
            ellipse9.Layer = refin;
            ellipse9.Lineweight = Lineweight.W35;
            ellipse9.Linetype = Linetype.Dashed;
            dxf.AddEntity(ellipse9);
            Line line14 = new Line(v10, v13);
            line14.Layer = refin;
            line14.Lineweight = Lineweight.W35;
            line14.Linetype = Linetype.Dashed;
            dxf.AddEntity(line14);
            Line line15 = new Line(v11, v14);
            line15.Layer = refin;
            line15.Lineweight = Lineweight.W35;
            line15.Linetype = Linetype.Dashed;
            dxf.AddEntity(line15);
            Line line16 = new Line(v16, v19);
            line16.Layer = refin;
            line16.Lineweight = Lineweight.W35;
            line16.Linetype = Linetype.Dashed;
            dxf.AddEntity(line16);
            Line line17 = new Line(v17, v20);
            line17.Layer = refin;
            line17.Lineweight = Lineweight.W35;
            line17.Linetype = Linetype.Dashed;
            dxf.AddEntity(line17);
            Line line18 = new Line(v22, v25);
            line18.Layer = refin;
            line18.Lineweight = Lineweight.W35;
            line18.Linetype = Linetype.Dashed;
            dxf.AddEntity(line18);
            Line line19 = new Line(v23, v26);
            line19.Layer = refin;
            line19.Lineweight = Lineweight.W35;
            line19.Linetype = Linetype.Dashed;
            dxf.AddEntity(line19);
            Line line20 = new Line(v28, v31);
            line20.Layer = refin;
            line20.Lineweight = Lineweight.W35;
            line20.Linetype = Linetype.Dashed;
            dxf.AddEntity(line20);
            Line line21 = new Line(v29, v32);
            line21.Layer = refin;
            line21.Lineweight = Lineweight.W35;
            line21.Linetype = Linetype.Dashed;
            dxf.AddEntity(line21);


            fun.jt(dxf, fun.Polar(v1, 173 * pi / 180, 22.24), 145, 8.5, 1, "C1");


            fun.text(dxf, new Vector2(-38, 22.5), 1, "孔（H1,H2,H3,H4）和圆（C1）上的孔模样都是");
            fun.text(dxf, new Vector2(-38, 21), 1, "symmetric_shape_aspect");
            fun.text(dxf, new Vector2(7, 22.5), 1, "四个孔模样（H1,H2,H3,H4）");
            fun.text(dxf, new Vector2(4, 21), 1, "一起形成composite_shape_aspect");
            fun.text(dxf, new Vector2(-16, 13.5), 1, "H1");
            fun.text(dxf, new Vector2(16, 13.5), 1, "H2");
            fun.text(dxf, new Vector2(16, -13.5), 1, "H3");
            fun.text(dxf, new Vector2(-17.5, -13.5), 1, "H4");



            fun.text(dxf, new Vector2(-39, -45), 3, "图7 对称形状外观和组合的形状外观");





            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Standard16656_47_8(Dictionary<string, Object> data)
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
                                                                           //参数
            double pi = Math.PI;
            string path = Convert.ToString(data["path"]);
            //坐标
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = fun.Polar(v1, 0, 44.5);
            Vector2 v3 = fun.Polar(v2, 90 * pi / 180, 21.5);
            Vector2 v4 = fun.Polar(v1, 90 * pi / 180, 21.5);
            Vector2 v5 = fun.Polar(v1, 0 * pi / 180, 18);
            Vector2 v6 = fun.Polar(v2, 180 * pi / 180, 18);
            Vector2 v7 = fun.Polar(v5, 90 * pi / 180, 15);
            Vector2 v8 = fun.Polar(v6, 90 * pi / 180, 15);
            Vector2 v9 = fun.Polar(v4, 0 * pi / 180, 11.75);
            Vector2 v10 = fun.Polar(v3, 180 * pi / 180, 11.75);
            Vector2 v11 = fun.Polar(v1, 0 * pi / 180, 22.25);
            Vector2 v12 = fun.Polar(v11, 90 * pi / 180, 46.5); 
            Vector2 v13 = fun.Polar(v11, -90 * pi / 180, 1.75);

            LwPolyline line1 = new LwPolyline();
            line1.Vertexes.Add(new LwPolylineVertex(v1));
            line1.Vertexes.Add(new LwPolylineVertex(v2));
            line1.Vertexes.Add(new LwPolylineVertex(v3));
            line1.Vertexes.Add(new LwPolylineVertex(v4));
            line1.Vertexes.Add(new LwPolylineVertex(v1));
            line1.Layer = contour;
            line1.Lineweight = Lineweight.W50;
            dxf.AddEntity(line1);
            Line line2 = new Line(v5, v7);
            line2.Layer = refin;
            line2.Lineweight = Lineweight.W35;
            line2.Linetype = Linetype.Dashed;
            dxf.AddEntity(line2);
            Line line3 = new Line(v8, v6);
            line3.Layer = refin;
            line3.Lineweight = Lineweight.W35;
            line3.Linetype = Linetype.Dashed;
            dxf.AddEntity(line3);
            Line line4 = new Line(v12, v13);
            line4.Layer = centre;
            line4.Lineweight = Lineweight.W25;
            line4.Linetype = Linetype.DashDot;
            dxf.AddEntity(line4);

            Solid solid = new Solid(v9, v7, v10, v8)
            {
                Layer = Layer.Default,
                Linetype = Linetype.ByBlock,
                Color = AciColor.ByBlock
            };
            dxf.AddEntity(solid);

            //标注
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 1;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            dimensionStyle.TextHeight = 0.5;
            double offset = 10;
            Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v8, v10), new Line(v7, v9), offset * 3, dimensionStyle);
            angdim1.UserText = "较小的";
            dxf.AddEntity(angdim1);

            fun.jt(dxf, fun.Polar(v1, 53 * pi / 180, 28.5), 158, 24, 3, "");

            fun.text(dxf, new Vector2(-21, 33), 1, "shape_aspect 要素如");
            fun.text(dxf, new Vector2(-21, 31.5), 1, "conical_hole");



            fun.text(dxf, new Vector2(2, -15), 3, "图8 单一角形状外观");


            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Standard16656_47_9(Dictionary<string, Object> data)
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
                                                                           //参数
            double pi = Math.PI;
            string path = Convert.ToString(data["path"]);
            //坐标
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = fun.Polar(v1, 90 * pi / 180, 3);
            Vector2 v3 = fun.Polar(v2, pi, 26);
            Vector2 v4 = fun.Polar(v3, 43 * pi / 180, 23);
            Vector2 v5 = fun.Polar(v4, 90 * pi / 180, 4.25);
            Vector2 v6 = fun.Polar(v5, -137 * pi / 180, 50);
            Vector2 v7 = fun.Polar(v5, 43 * pi / 180, 5);
            Vector2 v8 = fun.Polar(v1, 180 * pi / 180, 64);
            Vector2 v9 = fun.Polar(v8, 90 * pi / 180, 9.25);
            Vector2 v10 = fun.Polar(v9, 0 * pi / 180, 40.1447);
            Vector2 v11 = fun.Polar(v8, 0 * pi / 180, 30.7253);
            Vector2 v12 = new Vector2(v8.X + 7, v8.Y + 4.625);
            Vector2 v13 = fun.Polar(v1, 18 * pi / 180, 42);
            Vector2 v14 = fun.Polar(v13, 90 * pi / 180, 27.5);
            Vector2 v15 = fun.Polar(v13, -90 * pi / 180, 27.5);
            Vector2 v16 = fun.Polar(v13, 180 * pi / 180, 27.5);
            Vector2 v17 = fun.Polar(v13, 0 * pi / 180, 27.5);
            Vector2 v18 = fun.Polar(v13, 135 * pi / 180, 27.5);
            Vector2 v19 = fun.Polar(v13, -45 * pi / 180, 27.5);
            Vector2 v20 = fun.Polar(v12, 180 * pi / 180, 9.5);
            Vector2 v21 = fun.Polar(v12, 0 * pi / 180, 9.5);
            Vector2 v22 = fun.Polar(v12, 90 * pi / 180, 6.5);
            Vector2 v23 = fun.Polar(v12, -90 * pi / 180, 6.5);
            Vector2 v24 = fun.Polar(v13, 90 * pi / 180, 14);
            Vector2 v25 = fun.Polar(v13, 45 * pi / 180, 14);
            Vector2 v26 = fun.Polar(v13, 0 * pi / 180, 14);
            Vector2 v27 = fun.Polar(v13, -45 * pi / 180, 14);
            Vector2 v28 = fun.Polar(v13, -90 * pi / 180, 14);
            Vector2 v29 = fun.Polar(v13, -135 * pi / 180, 14);
            Vector2 v30 = fun.Polar(v13, 180 * pi / 180, 14);
            Vector2 v31 = fun.Polar(v13, 135 * pi / 180, 14);

            LwPolyline line1 = new LwPolyline();
            line1.Vertexes.Add(new LwPolylineVertex(v1));
            line1.Vertexes.Add(new LwPolylineVertex(v2));
            line1.Vertexes.Add(new LwPolylineVertex(v3));
            line1.Vertexes.Add(new LwPolylineVertex(v4));
            line1.Vertexes.Add(new LwPolylineVertex(v5));
            line1.Vertexes.Add(new LwPolylineVertex(v10));
            line1.Vertexes.Add(new LwPolylineVertex(v9));
            line1.Vertexes.Add(new LwPolylineVertex(v8));
            line1.Vertexes.Add(new LwPolylineVertex(v1));
            line1.Layer = contour;
            line1.Lineweight = Lineweight.W50;
            dxf.AddEntity(line1);
            Line line2 = new Line(v20, v21);
            line2.Layer = centre;
            line2.Lineweight = Lineweight.W25;
            line2.Linetype = Linetype.DashDot;
            dxf.AddEntity(line2);
            Line line3 = new Line(v22, v23);
            line3.Layer = centre;
            line3.Lineweight = Lineweight.W25;
            line3.Linetype = Linetype.DashDot;
            dxf.AddEntity(line3);
            Line line4 = new Line(v6, v7);
            line4.Layer = centre;
            line4.Lineweight = Lineweight.W25;
            line4.Linetype = Linetype.DashDot;
            dxf.AddEntity(line4);
            Line line5 = new Line(v14, v15);
            line5.Layer = centre;
            line5.Lineweight = Lineweight.W25;
            line5.Linetype = Linetype.DashDot;
            dxf.AddEntity(line5);
            Line line6 = new Line(v16, v17);
            line6.Layer = centre;
            line6.Lineweight = Lineweight.W25;
            line6.Linetype = Linetype.DashDot;
            dxf.AddEntity(line6);
            Line line7 = new Line(v18, v19);
            line7.Layer = centre;
            line7.Lineweight = Lineweight.W25;
            line7.Linetype = Linetype.DashDot;
            dxf.AddEntity(line7);
            Circle circle1 = new Circle(v12, 2);
            circle1.Layer = contour;
            circle1.Lineweight = Lineweight.W50;
            dxf.AddEntity(circle1);
            Circle circle2 = new Circle(v13, 14);
            circle2.Layer = centre;
            circle2.Lineweight = Lineweight.W25;
            circle2.Linetype = Linetype.DashDot;
            dxf.AddEntity(circle2);
            Circle circle3 = new Circle(v24, 2.5);
            circle3.Layer = contour;
            circle3.Lineweight = Lineweight.W50;
            dxf.AddEntity(circle3);
            Circle circle4 = new Circle(v25, 2.5);
            circle4.Layer = contour;
            circle4.Lineweight = Lineweight.W50;
            dxf.AddEntity(circle4);
            Circle circle5 = new Circle(v26, 2.5);
            circle5.Layer = contour;
            circle5.Lineweight = Lineweight.W50;
            dxf.AddEntity(circle5);
            Circle circle6 = new Circle(v27, 2.5);
            circle6.Layer = contour;
            circle6.Lineweight = Lineweight.W50;
            dxf.AddEntity(circle6);
            Circle circle7 = new Circle(v28, 2.5);
            circle7.Layer = contour;
            circle7.Lineweight = Lineweight.W50;
            dxf.AddEntity(circle7);
            Circle circle8 = new Circle(v29, 2.5);
            circle8.Layer = contour;
            circle8.Lineweight = Lineweight.W50;
            dxf.AddEntity(circle8);
            Circle circle9 = new Circle(v30, 2.5);
            circle9.Layer = contour;
            circle9.Lineweight = Lineweight.W50;
            dxf.AddEntity(circle9);
            Circle circle10 = new Circle(v31, 2.5);
            circle10.Layer = contour;
            circle10.Lineweight = Lineweight.W50;
            dxf.AddEntity(circle10);

            //标注
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 1;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            dimensionStyle.TextHeight = 0.5;
            double offset = 10;
            Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v6, v7), new Line(v21, v20), offset * 2, dimensionStyle);
            angdim1.UserText = "较大的";
            dxf.AddEntity(angdim1);
            Angular2LineDimension angdim2 = new Angular2LineDimension(new Line(v21, v20), new Line(v7, v6), offset * 2, dimensionStyle);
            angdim2.UserText = "较小的";
            dxf.AddEntity(angdim2);
            Angular2LineDimension angdim3 = new Angular2LineDimension(new Line(v13, v14), new Line(v19, v18), offset * 2, dimensionStyle);
            angdim3.UserText = "相等";
            dxf.AddEntity(angdim3);
            Angular2LineDimension angdim4 = new Angular2LineDimension(new Line(v19, v18), new Line(v17, v16), offset * 2, dimensionStyle);
            angdim4.UserText = "相等";
            dxf.AddEntity(angdim4);


            fun.jt(dxf, fun.Polar(v12, pi, 5.5), -92, 18, 3, "");
            fun.jt(dxf, fun.Polar(v10, pi, 17), 151, 17, 3, "");
            fun.jt(dxf, fun.Polar(v10, 43 * pi / 180, 5), 107, 18, 3, "");
            fun.jt(dxf, fun.Polar(v11, -137 * pi / 180, 6), -20, 7, 3, "");
            fun.jt(dxf, fun.Polar(v13, -45 * pi / 180, 21.25), -118, 12.5, 3, "");
            fun.jt(dxf, fun.Polar(v25, 75 * pi / 180, 2.5), 75, 8.5, 3, "");



            fun.text(dxf, new Vector2(-64, 19), 1, "shape_aspect");
            fun.text(dxf, new Vector2(-64, 17.5), 1, "(a)");
            fun.text(dxf, new Vector2(-27, 33.5), 1, "shape_aspect");
            fun.text(dxf, new Vector2(-27, 32), 1, "(b)");
            fun.text(dxf, new Vector2(-29.5, -7.5), 1, "derived_shape_aspect");
            fun.text(dxf, new Vector2(-29.5, -9), 1, "(c)");
            fun.text(dxf, new Vector2(-64, -16), 1, "derived_shape_aspect");
            fun.text(dxf, new Vector2(-64, -17.5), 1, "(d)");
            fun.text(dxf, new Vector2(51, 35.5), 1, "shape_aspect");
            fun.text(dxf, new Vector2(35.5, -15.5), 1, "derived_shape_aspect");



            fun.text(dxf, new Vector2(-13, -40), 3, "图9 角的位置");

            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Standard16656_47_10(Dictionary<string, Object> data)
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
                                                                           //参数
            double pi = Math.PI;
            string path = Convert.ToString(data["path"]);
            //坐标
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = fun.Polar(v1, 90 * pi / 180, 25);
            Vector2 v3 = fun.Polar(v1, 180 * pi / 180, 25);
            Vector2 v4 = fun.Polar(v1, -90 * pi / 180, 25);
            Vector2 v5 = fun.Polar(v1, 0 * pi / 180, 30);
            Vector2 v6 = fun.Polar(v1, 90 * pi / 180, 18.5);
            Vector2 v7 = fun.Polar(v6, 180 * pi / 180, 12.5);
            Vector2 v8 = fun.Polar(v7, -90 * pi / 180, 37);
            Vector2 v9 = fun.Polar(v8, 0 * pi / 180, 41);
            Vector2 v10 = fun.Polar(v9, 90 * pi / 180, 37);
            Vector2 v11 = fun.Polar(v10, 180 * pi / 180, 10);
            Vector2 v12 = fun.Polar(v11, -90 * pi / 180, 18.5);
            Vector2 v13 = fun.Polar(v1, -2 * pi / 180, 49);
            Vector2 v14 = fun.Polar(v13, 0 * pi / 180, 46);
            Vector2 v15 = fun.Polar(v14, 90 * pi / 180, 5);
            Vector2 v16 = fun.Polar(v15, 180 * pi / 180, 37);
            Vector2 v17 = fun.Polar(v16, 46 * pi / 180, 34);
            Vector2 v18 = fun.Polar(v17, 90 * pi / 180, 8);
            Vector2 v19 = fun.Polar(v13, 90 * pi / 180, 5.5);

            LwPolyline line1 = new LwPolyline();
            line1.Vertexes.Add(new LwPolylineVertex(v1));
            line1.Vertexes.Add(new LwPolylineVertex(v6));
            line1.Vertexes.Add(new LwPolylineVertex(v7));
            line1.Vertexes.Add(new LwPolylineVertex(v8));
            line1.Vertexes.Add(new LwPolylineVertex(v9));
            line1.Vertexes.Add(new LwPolylineVertex(v10));
            line1.Vertexes.Add(new LwPolylineVertex(v11));
            line1.Vertexes.Add(new LwPolylineVertex(v12));
            line1.Vertexes.Add(new LwPolylineVertex(v1));
            line1.Layer = contour;
            line1.Lineweight = Lineweight.W50;
            dxf.AddEntity(line1);
            LwPolyline line2 = new LwPolyline();
            line2.Vertexes.Add(new LwPolylineVertex(v13));
            line2.Vertexes.Add(new LwPolylineVertex(v14));
            line2.Vertexes.Add(new LwPolylineVertex(v15));
            line2.Vertexes.Add(new LwPolylineVertex(v16));
            line2.Vertexes.Add(new LwPolylineVertex(v17));
            line2.Vertexes.Add(new LwPolylineVertex(v18));
            line2.Vertexes.Add(new LwPolylineVertex(v19));
            line2.Vertexes.Add(new LwPolylineVertex(v13));
            line2.Layer = contour;
            line2.Lineweight = Lineweight.W50;
            dxf.AddEntity(line2);
            Line line3 = new Line(v3, v5);
            line3.Layer = centre;
            line3.Lineweight = Lineweight.W25;
            line3.Linetype = Linetype.DashDot;
            dxf.AddEntity(line3);
            Line line4 = new Line(v2, v4);
            line4.Layer = centre;
            line4.Lineweight = Lineweight.W25;
            line4.Linetype = Linetype.DashDot;
            dxf.AddEntity(line4);


            //标注
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 1;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            dimensionStyle.TextHeight = 0.5;
            double offset = 10;
            Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v4, v2), new Line(v5, v3), offset * 2.1, dimensionStyle);
            angdim1.UserText = "相等";
            dxf.AddEntity(angdim1);
            Angular2LineDimension angdim2 = new Angular2LineDimension(new Line(v5, v3), new Line(v2, v4), offset * 2.1, dimensionStyle);
            angdim2.UserText = "相等";
            dxf.AddEntity(angdim2);
            Angular2LineDimension angdim3 = new Angular2LineDimension(new Line(v2, v4), new Line(v3, v5), offset * 2.1, dimensionStyle);
            angdim3.UserText = "相等";
            dxf.AddEntity(angdim3);
            Angular2LineDimension angdim4 = new Angular2LineDimension(new Line(v3, v5), new Line(v4, v2), offset * 2.1, dimensionStyle);
            angdim4.UserText = "相等";
            dxf.AddEntity(angdim4);
            Angular2LineDimension angdim5 = new Angular2LineDimension(new Line(v18, v19), new Line(v13, v14), offset * 1, dimensionStyle);
            angdim5.UserText = "大";
            dxf.AddEntity(angdim5);
            Angular2LineDimension angdim6 = new Angular2LineDimension(new Line(v16, v15), new Line(v16, v17), offset * 1, dimensionStyle);
            angdim6.UserText = "小";
            dxf.AddEntity(angdim6);



            fun.jt(dxf, fun.Polar(v1, 90 * pi / 180, 9.25), 30, 29.5, 3, "");
            fun.jt(dxf, fun.Polar(v1, 0, 12), 58, 27.5, 3, "");
            fun.jt(dxf, fun.Polar(v16, 46 * pi / 180, 17), -23, 7.5, 3, "");
            fun.jt(dxf, fun.Polar(v16, 0, 17), 51, 5, 3, "");


            fun.text(dxf, new Vector2(24, 25.5), 1, "shape_aspect");
            fun.text(dxf, new Vector2(74, 10), 1, "shape_aspect");




            fun.text(dxf, new Vector2(25, -40), 3, "图10 角的大小");




            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Standard16656_47_11(Dictionary<string, Object> data)
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
                                                                           //参数
            double pi = Math.PI;
            string path = Convert.ToString(data["path"]);
            //坐标
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = fun.Polar(v1, 90 * pi / 180, 29);
            Vector2 v3 = fun.Polar(v1, 180 * pi / 180, 29);
            Vector2 v4 = fun.Polar(v1, 0 * pi / 180, 29);
            Vector2 v5 = fun.Polar(v1, -90 * pi / 180, 29);
            Vector2 v6 = fun.Polar(v1, 90 * pi / 180, 16);
            Vector2 v7 = fun.Polar(v1, 0 * pi / 180, 16);
            Vector2 v8 = fun.Polar(v1, -90 * pi / 180, 16);
            Vector2 v9 = fun.Polar(v1, 180 * pi / 180, 16);
            Vector2 v10 = fun.Polar(v1, 145 * pi / 180, 33);
            Vector2 v11 = fun.Polar(v1, 47 * pi / 180, 16);
            Vector2 v12 = fun.Polar(v7, 45 * pi / 180, 3.5);
            Vector2 v13 = fun.Polar(v7, -135 * pi / 180, 3.5);
            Vector2 v14 = fun.Polar(v1, 145 * pi / 180, 16);
            Vector2 v15 = fun.Polar(v1, 138 * pi / 180, 23);
            Vector2 v16 = fun.Polar(v1, 152 * pi / 180, 23);

            Line line1 = new Line(v3, v4);
            line1.Layer = centre;
            line1.Lineweight = Lineweight.W25;
            line1.Linetype = Linetype.DashDot;
            dxf.AddEntity(line1);
            Line line2 = new Line(v2, v5);
            line2.Layer = centre;
            line2.Lineweight = Lineweight.W25;
            line2.Linetype = Linetype.DashDot;
            dxf.AddEntity(line2);
            Line line3 = new Line(v1, v10);
            line3.Layer = centre;
            line3.Lineweight = Lineweight.W25;
            line3.Linetype = Linetype.DashDot;
            dxf.AddEntity(line3);
            Circle circle1 = new Circle(v1, 3.5);
            circle1.Layer = contour;
            circle1.Lineweight = Lineweight.W50;
            dxf.AddEntity(circle1);
            Circle circle2 = new Circle(v1, 16);
            circle2.Layer = centre;
            circle2.Lineweight = Lineweight.W25;
            circle2.Linetype = Linetype.DashDot;
            dxf.AddEntity(circle2);
            Circle circle3 = new Circle(v6, 3.5);
            circle3.Layer = contour;
            circle3.Lineweight = Lineweight.W50;
            dxf.AddEntity(circle3);
            Circle circle4 = new Circle(v7, 3.5);
            circle4.Layer = contour;
            circle4.Lineweight = Lineweight.W50;
            dxf.AddEntity(circle4);
            Circle circle5 = new Circle(v8, 3.5);
            circle5.Layer = contour;
            circle5.Lineweight = Lineweight.W50;
            dxf.AddEntity(circle5);
            Circle circle6 = new Circle(v9, 3.5);
            circle6.Layer = contour;
            circle6.Lineweight = Lineweight.W50;
            dxf.AddEntity(circle6);
            Arc arc = new Arc(v1, 23, 152, 138);
            arc.Layer = contour;
            arc.Lineweight = Lineweight.W50;
            dxf.AddEntity(arc);
            Line line4 = new Line(v15, v14);
            line4.Layer = contour;
            line4.Lineweight = Lineweight.W50;
            dxf.AddEntity(line4);
            Line line5 = new Line(v16, v14);
            line5.Layer = contour;
            line5.Lineweight = Lineweight.W50;
            dxf.AddEntity(line5);

            //标注
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 1;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            dimensionStyle.TextHeight = 0.5;
            double offset = 10;
            Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v1, v2), new Line(v1, v10), offset * 4, dimensionStyle);
            angdim1.UserText = "angular_location";
            dxf.AddEntity(angdim1);
            Angular2LineDimension angdim2 = new Angular2LineDimension(new Line(v14, v15), new Line(v14, v16), offset * 1.5, dimensionStyle);
            angdim2.UserText = "angular_size";
            dxf.AddEntity(angdim2);


            fun.jt(dxf, v11, -135, 14.5, 3, "");
            fun.jt(dxf, v12, -135, 2, 3, "");
            fun.jt(dxf, v13, 45, 2, 3, "");
            fun.jt(dxf, fun.Polar(v1, 43 * pi / 180, 11), 18, 26.5, 3, "");
            fun.jt(dxf, fun.Polar(v7, -135 * pi / 180, 1), -40, 18.5, 3, "");



            fun.text(dxf, new Vector2(28, 17), 1, "dimensional_location");
            fun.text(dxf, new Vector2(28, -15), 1, "dimensional_size");




            fun.text(dxf, new Vector2(-25, -50), 3, "图11 尺寸位置和尺寸大小");


            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Standard16656_47_12(Dictionary<string, Object> data)
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
                                                                           //参数
            double pi = Math.PI;
            string path = Convert.ToString(data["path"]);
            //坐标
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = fun.Polar(v1, 33 * pi / 180, 26);
            Vector2 v3 = fun.Polar(v2, 0 * pi / 180, 77.5);
            Vector2 v4 = fun.Polar(v3, 90 * pi / 180, 39);
            Vector2 v5 = fun.Polar(v4, 180 * pi / 180, 77.5);
            Vector2 v6 = new Vector2(v2.X + 16, v2.Y + 11.5);
            Vector2 v7 = fun.Polar(v6, 20 * pi / 180, 50);
            Vector2 v8 = fun.Polar(v6, 90 * pi / 180, 6.5);
            Vector2 v9 = fun.Polar(v6, 180 * pi / 180, 6.5);
            Vector2 v10 = fun.Polar(v6, -90 * pi / 180, 6.5);
            Vector2 v11 = fun.Polar(v6, 0 * pi / 180, 6.5);
            Vector2 v12 = fun.Polar(v7, 90 * pi / 180, 6.5);
            Vector2 v13 = fun.Polar(v7, 180 * pi / 180, 6.5);
            Vector2 v14 = fun.Polar(v7, -90 * pi / 180, 6.5);
            Vector2 v15 = fun.Polar(v7, 0 * pi / 180, 6.5);



            LwPolyline line1 = new LwPolyline();
            line1.Vertexes.Add(new LwPolylineVertex(v2));
            line1.Vertexes.Add(new LwPolylineVertex(v3));
            line1.Vertexes.Add(new LwPolylineVertex(v4));
            line1.Vertexes.Add(new LwPolylineVertex(v5));
            line1.Vertexes.Add(new LwPolylineVertex(v2));
            line1.Layer = contour;
            line1.Lineweight = Lineweight.W50;
            dxf.AddEntity(line1);
            Line line2 = new Line(v8, v10);
            line2.Layer = centre;
            line2.Lineweight = Lineweight.W25;
            line2.Linetype = Linetype.DashDot;
            dxf.AddEntity(line2);
            Line line3 = new Line(v9, v11);
            line3.Layer = centre;
            line3.Lineweight = Lineweight.W25;
            line3.Linetype = Linetype.DashDot;
            dxf.AddEntity(line3);
            Line line4 = new Line(v13, v15);
            line4.Layer = centre;
            line4.Lineweight = Lineweight.W25;
            line4.Linetype = Linetype.DashDot;
            dxf.AddEntity(line4);
            Line line5 = new Line(v12, v14);
            line5.Layer = centre;
            line5.Lineweight = Lineweight.W25;
            line5.Linetype = Linetype.DashDot;
            dxf.AddEntity(line5);
            Circle circle1 = new Circle(v6, 4.5);
            circle1.Layer = refin;
            circle1.Lineweight = Lineweight.W35;
            circle1.Linetype = Linetype.Dashed;
            dxf.AddEntity(circle1);
            Circle circle2 = new Circle(v7, 4.5);
            circle2.Layer = contour;
            circle2.Lineweight = Lineweight.W50;
            dxf.AddEntity(circle2);



            fun.jt(dxf, fun.Polar(v1, 0, 28), 180, 26.5, 3, "");
            fun.jt(dxf, fun.Polar(v1, 90 * pi / 180, 20), -90, 18.5, 3, "");
            fun.jt(dxf, v6, 20, 23.5, 3, "");
            fun.jt(dxf, v7, -160, 23.5, 3, "");





            fun.text(dxf, new Vector2(-2, 18.5), 1, "Y");
            fun.text(dxf, new Vector2(25.5, -2), 1, "X");
            fun.text(dxf, new Vector2(32, 31.5), 1, "H1");
            fun.text(dxf, new Vector2(59, 37), 1, "D1");
            fun.text(dxf, new Vector2(81, 48), 1, "H2");




            fun.text(dxf, new Vector2(25, -30), 3, "图12 带路径的尺寸位置");







            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Standard16656_47_13(Dictionary<string, Object> data)
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
                                                                           //参数
            double pi = Math.PI;
            string path = Convert.ToString(data["path"]);
            //坐标
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = fun.Polar(v1, 90 * pi / 180, 9);
            Vector2 v3 = new Vector2(v1.X - 17, v1.Y + 15);
            Vector2 v4 = fun.Polar(v3, 90 * pi / 180, 3);
            Vector2 v5 = fun.Polar(v4, pi, 8);
            Vector2 v6 = fun.Polar(v5, -90 * pi / 180, 13.5);
            Vector2 v7 = fun.Polar(v6, pi, 34);
            Vector2 v8 = new Vector2(v2.X, -v2.Y);
            Vector2 v9 = new Vector2(v3.X, -v3.Y);
            Vector2 v10 = new Vector2(v4.X, -v4.Y);
            Vector2 v11 = new Vector2(v5.X, -v5.Y);
            Vector2 v12 = new Vector2(v6.X, -v6.Y);
            Vector2 v13 = new Vector2(v7.X, -v7.Y);
            Vector2 v14 = fun.Polar(v1, pi, 69.5);
            Vector2 v15 = fun.Polar(v1, 0, 13);
            Vector2 v16 = fun.Polar(v1, pi, 20.5);
            Vector2 v17 = fun.Polar(v16, 59 * pi / 180, 28);

            LwPolyline line1 = new LwPolyline();
            line1.Vertexes.Add(new LwPolylineVertex(v1));
            line1.Vertexes.Add(new LwPolylineVertex(v2));
            line1.Vertexes.Add(new LwPolylineVertex(v3));
            line1.Vertexes[1].Bulge = Math.Tan(-50 * pi / 180 / 4);
            line1.Vertexes.Add(new LwPolylineVertex(v4));
            line1.Vertexes.Add(new LwPolylineVertex(v5));
            line1.Vertexes.Add(new LwPolylineVertex(v6));
            line1.Vertexes.Add(new LwPolylineVertex(v7));
            line1.Vertexes.Add(new LwPolylineVertex(v13));
            line1.Vertexes.Add(new LwPolylineVertex(v12));
            line1.Vertexes.Add(new LwPolylineVertex(v11));
            line1.Vertexes.Add(new LwPolylineVertex(v10));
            line1.Vertexes.Add(new LwPolylineVertex(v9));
            line1.Vertexes.Add(new LwPolylineVertex(v8));
            line1.Vertexes[11].Bulge = Math.Tan(-50 * pi / 180 / 4);
            line1.Vertexes.Add(new LwPolylineVertex(v1));
            line1.Layer = contour;
            line1.Lineweight = Lineweight.W50;
            dxf.AddEntity(line1);
            Line line2 = new Line(v14, v15);
            line2.Layer = centre;
            line2.Lineweight = Lineweight.W25;
            line2.Linetype = Linetype.DashDot;
            dxf.AddEntity(line2);
            Line line3 = new Line(v16, v17);
            line3.Layer = centre;
            line3.Lineweight = Lineweight.W25;
            line3.Linetype = Linetype.DashDot;
            dxf.AddEntity(line3);
            Line line4 = new Line(v6, v12);
            line4.Layer = contour;
            line4.Lineweight = Lineweight.W50;
            dxf.AddEntity(line4);
            Line line5 = new Line(v3, v9);
            line5.Layer = contour;
            line5.Lineweight = Lineweight.W50;
            dxf.AddEntity(line5);



            //标注
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 1;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            dimensionStyle.TextHeight = 0.5;
            double offset = 10;
            Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v16, v17), new Line(v16, v15), offset * 3, dimensionStyle);
            angdim1.UserText = "角";
            dxf.AddEntity(angdim1);


            fun.jt(dxf, fun.Polar(v1, 138 * pi / 180, 18.5689), 87, 14.5, 3, "");
            fun.jt(dxf, fun.Polar(v14, 0 * pi / 180, 4.25), 77, 9, 3, "");
            fun.jt(dxf, fun.Polar(v13, 0 * pi / 180, 8.5), -71, 11.5, 3, "");



            fun.text(dxf, new Vector2(-66, 11), 1, "centre_of_symmetry");
            fun.text(dxf, new Vector2(-50, -18), 1, "datum_feature");
            fun.text(dxf, new Vector2(6.25, 17.5), 1, "runout_zone_oriontation");
            fun.text(dxf, new Vector2(-14, 29.5), 1, "边界");
            fun.text(dxf, new Vector2(6.25, 16), 1, "角");



            fun.text(dxf, new Vector2(-40, -40), 3, "图13 跳动公差定义");



            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
    }
}
